<!DOCTYPE html>
<html lang="en">
<head>
    <title>编辑账户</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/dist/plugins/select2/select2.min.css">
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=86e2297f">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=222aea35">
    <style type="text/css">
        .leftFilter {
            float: left;
            text-align: left;
            margin-right: 5px;
        }

        .clickable {
            color: #489EF1;
            cursor: pointer;
            text-align: left;
            font-weight: bold;
        }

        .td {
            text-align: center;
        }
    </style>
</head>
<body>
<section class="content" id="list">
    <table class="table table-bordered" style="max-width: 750px;margin: -1px 0">
        <thead>
        <tr>
            <!--<th style="width: 100px;text-align: center">公司名称</th>-->
            <th class="td-title">账户名称</th>
            <th class="td-title">账户账号</th>
            <th class="td-title">账户初始值</th>
            <th class="td-title">账户用途</th>
            <th class="td-title">使用状态</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <!--<td v-model="item.companyName" style="text-align: center">{{item.companyName}}</td>-->
            <td class="td-value">
                <input v-model="bankCard.bankName" style="width: 100%;text-align:center;border: none" />
            </td>
            <td class="td-value">
                <input v-model="bankCard.bankCard" style="width: 100%;text-align:center;border: none" />
            </td>
            <td class="td-value">{{bankCard.initMoney}}</td>
            <td class="td-value">
                <select style="width: 100%;float: left;border: none;background: none" v-model="bankCard.accountApplication">
                    <option value="一般户" selected>一般户</option>
                    <option value="基本户">基本户</option>
                    <option value="保证金账户">保证金账户</option>
                    <option value="贷款户">贷款户</option>
                    <option value="外币户">外币户</option>
                    <option value="个人户">个人户</option>
                    <option value="POS机户">POS机户</option>
                    <option value="专户">专户</option>
                    <option value="支付宝账户">支付宝账户</option>
                    <option value="微信账户">微信账户</option>
                </select>
            </td>
            <td class="td-value">
                <select style="width: 100%;float: left;border: none;background: none" v-model="bankCard.useStatus">
                    <option value="1" selected>使用中</option>
                    <option value="0">停用</option>
                </select>
            </td>
        </tr>
        </tbody>
    </table>

    <div style="height:30px;line-height:30px;text-align: center;z-index:999;padding-top:5px;margin-bottom: 15px">
        <input type="button" value="保存" @click="saveAccount()" class="btn oaBtn btn-sm" style="margin-top:5px;">
    </div>
    </div>
    <!-- /.box-body -->
</section>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript" src="/dist/plugins/select2/select2.full.min.js"></script>
<script type="text/javascript">
    var api = frameElement.api, W = api.opener;
    var app = new Vue({
        el: '#list',
        data: {
            currentUser: getCurrentUser(),
            id:$.wyui.page.urlParams.id,
            bankCard:{},
            time:"",
            PerES: false
        },
        methods: {
            //  保存账户
            saveAccount: function (index) {
                var that = this;
                $.wyui.postMethod(urlConfig.capital.bankCard.updateBankCard, that.bankCard, function (r) {
//                    parent.app.query();
                    var $iframe = top.findIframeByName("银行卡账户管理");
                    $iframe[0].contentWindow.app.query();
                    api.close();
                });
            }
        },

        mounted: function () {
            var that = this;
            $.wyui.postMethod(urlConfig.capital.bankCard.getBankCard, {"id":that.id,useStatus:1}, function (r) {
                console.log(r)
               that.bankCard=r;
            });
        }
    });


</script>

</body>
</html>